-- GENERATED SPELL FOR [Twilight Geomancer] --


function spell0_5862(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5862', 3000, 1)
end

function spell1_5862(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(11990,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5862', 9000, 1)
end

function spell2_5862(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(11436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_5862', 10000, 1)
end

function Sorts_5862(pUnit, Event)
local choix_sorts_5862 = math.random(0, 2)
if choix_sorts_5862 == 0 then
pUnit:RegisterEvent('spell0_5862', 1, 1)
end
if choix_sorts_5862 == 1 then
pUnit:RegisterEvent('spell1_5862', 1, 1)
end
if choix_sorts_5862 == 2 then
pUnit:RegisterEvent('spell2_5862', 1, 1)
end
end

function mob5862_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_5862', math.random(1500, 3000), 1)
end

function mob5862_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5862_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob5862_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(5862, 1, 'mob5862_Action')
RegisterUnitEvent(5862, 2, 'mob5862_Leave')
RegisterUnitEvent(5862, 3, 'mob5862_Kill')
RegisterUnitEvent(5862, 4, 'mob5862_Die')
